<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<body>
<div th:fragment="withdrawal">
    <link rel="stylesheet"  href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/center.css"/>

    <div class="manage_box_one" id="bindingbankdiv" th:if="${ #lists.isEmpty(list)}">
        <div>
            <span><img src="images/visa.png"></span>
            <p>阁下还未<a id="bindingBank" href="/banklist" style="color:red;">绑定银行卡 !</a></p>
        </div>
    </div>


<div class="tk_nr"  th:if="${ not #lists.isEmpty(list)}">
        <div class="tk_title" style="padding-top:10px; height:40px;">
            <h3>提款</h3>
            <span>通常您的提款只需3-15分钟即可到账，若超过30分钟仍未到账，请联系在线客服核查。</span></div>
        <div class="tk_box">
            <form id="withdrawalFrom">

            <div class="tk_jr"><span class="text">提款金额：</span><span class="input">
              <input id="withdrawalMoney" name="withdrawalAmount" type="number" placeholder="金额" class="r_inptut inputwd300">
              </span></div>
            <div class="tk_ts" style="margin-top:0px; margin-left:120px;"><span id="withdrawalMoney_tips" class="text">最低提款值金额不能低于100元</span></div>

            <div class="tk_yh clear">
                <span class="text">选择银行：</span> <span class="radio">

                <label class="on" style="border: 1px solid #c8cccf; width: 300px" th:each="item:${list}" >
                 <input type="radio"  name="bankId" th:value="${item.bankId}">
                 <b style="margin-left:20px;" th:text="${item.bankName} +'**** **** ****'+ ${item.bankNo}">建设银行 **** **** **** 1582</b>

                </label>
              </span>
            </div>
            <div>
                <button type="button" id="withdrawal_submit" class="as_but inputwd300">提交提款</button>
            </div>
            </form>
            <script>

                $("#withdrawal_submit").click(function () {
                    $.ajax({
                        method: "POST",
                        url: "/withdrawalSubmit",
                        data: $("#withdrawalFrom").serializeArray(),
                        dataType: "json"
                    }).done(function (msg) {
                        if (msg.status == 'success') {
                            alert('保存成功!');
                        } else {
                            alert(msg.data)
                        }
                    });
                })

            </script>
        </div>
    </div>
</div>
</body>
</html>